package site.koudai.cloud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import site.koudai.cloud.entity.Order;

import java.util.List;

public interface OrderMapper extends BaseMapper<Order> {

    @Select("select *, (select name from dept t where t.id = dept_id) deptName,(select username from `user` t where t.id = user_id) username from `order`")
    List<Order> customList();

}
